﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MedicareDataAccess;
using MedicareModel;

namespace MedicareBusiness
{
    public class EventBO
    {
        private EventDAO events = new EventDAO();
        private PatientBO patients = new PatientBO();
        private EMTBO emts = new EMTBO(); 

        public void createEvent(Event anEvent)
        {
            events.createEvent(anEvent);
        }

        public void markAsDone(int anID)
        {
            events.updateEventStatus(anID, "Team on the way");
            events.assignEMTtoEvent(anID, emts.sendEMT());

            Event anEvent = new Event();
            anEvent = events.getEventByID(anID);
            patients.sendHelp(anEvent.patient.idPatient); 
        }
    }
}
